//
//  EAGLView.h
//  StmartBS
//
//  Created by Sangwon Lee on 10. 9. 10..
//  Copyright __MyCompanyName__ 2010. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "Interfaces.h"



// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
// The view content is basically an EAGL surface you render your OpenGL scene into.
// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.

@interface EAGLView : UIView

{    
@private

	
	I3DEngine*         m_pEngine;
	IRenderingEngine*  m_pRenderingEngine;
	EAGLContext*       m_context;
	float              m_timestamp;


    BOOL animating;
    BOOL displayLinkSupported;
    NSInteger animationFrameInterval;
    // Use of the CADisplayLink class is the preferred method for controlling your animation timing.
    // CADisplayLink will link to the main display and fire every vsync when added to a given run-loop.
    // The NSTimer class is used only as fallback when running on a pre 3.1 device where CADisplayLink
    // isn't available.
	id displayLink;
	
    NSTimer *animationTimer;
	UISegmentedControl* m_filterChooser;
	
	IBOutlet UIButton *StatusView;
	
	
}



// IBOutlet UIView *StartView;


@property (readonly, nonatomic, getter=isAnimating) BOOL animating;
@property (nonatomic) NSInteger animationFrameInterval;


- (void)startAnimation;
- (void)stopAnimation;
- (void)drawView: (CADisplayLink*) _displayLink;
// - (void)sendSubviewToBack:(UIView *) BackGroundView;


// Button Action

- (IBAction)HomeView: (id)sender;
- (IBAction)FirstFloorView: (id)sender;
- (IBAction)SecondFloorView: (id)sender;
- (IBAction)InfoView: (id)sender;
// - (IBAction)StatusView: (id)sender;



@end
